package com.leoman.dao;

import com.leoman.entity.Prompt;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

/**
 * PromptDao
 * Created by 涂奕恒 on 2016/11/23 0023 下午 3:45.
 */
public interface PromptDao extends JpaRepository<Prompt, Integer>, JpaSpecificationExecutor<Prompt> {

    @Query("select a from Prompt a where a.type = ?1")
    Prompt findOneByType(Integer type);
}